## Project 9 Speaker ![](media/image-20260123094442325.png) **1.Project Description** The Micro: Bit main board V2 has an built-in speaker, which makes adding sound to the programs easier. We can program the speaker to air all kinds of tones . **2.Components Needed** - Micro:bit main board V2 \*1 - Micro USB cable\*1 **3.Test Code** Link computer with micro:bit board by micro USB cable, and program in MakeCode editor. (1)Enter“Basic”module to find “show icon”and drag it into “on start”block; Click the little triangle to find"![](media/image-20260123094713114.png)". ![](media/image-20260123094722803.png) (2) Enter“Music”module to find and drug“play sound giggle until done” into “forever”block; Enter“Basic”module to find and drug“pause(ms) 100” into “forever” block ; Change 100 into 1000; ![](media/image-20260123094802373.png) (3)Copy ![](media/image-20260123094819616.png)three times and place it into “forever” block ; Click the little triangle to select “happy”,”hello”,”yawn”; ![](media/image-20260123094841096.png) Complete Program: ![](media/image-20260123094901681.png) Select“JavaScript" and“Python”to switch into JavaScript and Python language code: ![](media/image-20260123094914327.png) ![](media/image-20260123094920791.png) **4.Test Results** After uploading the test code to micro:bit main board V2 and powering the board via the USB cable, the speaker utters sound and the LED dot matrix shows the logo of music.